package com.heima.mapper;

import com.heima.pojo.dto.PartnerQueryDTO;
import com.heima.pojo.dto.PartnerDTO;
import com.heima.pojo.entity.TbPartner;
import com.heima.pojo.vo.PartnerVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PartnerMapper {


    /**
     * 添加合作伙伴
     * @param tbpartner
     * @return
     */
    int addPartner(@Param("tbpartner") TbPartner tbpartner);

    List<PartnerVO> search(@Param("partnerQueryDTO") PartnerQueryDTO partnerQueryDTO);

    PartnerVO getPartnerById(@Param("id") String id);

    int updatePartner(@Param("id") String id, @Param("partnerDTO") PartnerDTO partnerDTO);

    int deletePartner(String id);
}